<?php

class Reservations_BrowseAction extends SrsReservationsBaseAction
{
	public function getCredentials()
	{
		return 'reservations.browse';
	}

	public function executeRead(AgaviRequestDataHolder $rd)
	{
		$hall = Doctrine_Query::create()
		        ->from('Hall')
			      ->where('id=?', array($rd->getParameter('hall', 0)))
		        ->fetchOne();

		if (!$hall instanceof Hall) return $this->forward404();

		$this->setAttribute('hall', $hall);

   	return 'Success';
	}
}